#ifndef EFFECT_H
#define EFFECT_H
#include "../core/world.h"
#include "../affiliate/spriteAnima.h"
class effect:public world{
    spriteAnima* anima = nullptr;
    world* nextNode_ = nullptr;
public:
    static effect* createEffect(node* parent,const char* path,glm::vec2 pos,float scale,world* nextNode = nullptr);
    void setAnima(spriteAnima* anima_){anima=anima_;}
    void setNextNode(world* nextNode){nextNode_=nextNode;}
    spriteAnima* getAnima(){return anima;}
    world* getNextNode(){return nextNode_;}
    virtual void update(float dt) override;
    virtual void clean() override;
private:
    void checkFinish();
};

#endif  // EFFECT_H